package cn.edu.nuc.fourth.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import cn.edu.nuc.fourth.model.SchoolMes;
import cn.edu.nuc.fourth.services.interfaces.FillingService;
import cn.edu.nuc.fourth.util.ViewExcel;

@Controller
@RequestMapping("/excel")
public class ExcelController {

	@Autowired
	private FillingService service;

	@RequestMapping("/schoolexcel")
	public ModelAndView schoolexcel(Integer userid, Map<String, Object> map) {

		ViewExcel view = new ViewExcel();
		SchoolMes schoolmes = service.echart(-1);
		map.put("school", schoolmes);
		map.put("fileName", "学校基本情况.xml");
		return new ModelAndView(view, map);
	}
}
